package com.softhis.rekrutacja.client;

import com.google.gwt.user.client.ui.Widget;
import com.mvp4g.client.annotation.Event;
import com.mvp4g.client.annotation.Events;
import com.mvp4g.client.annotation.Start;
import com.mvp4g.client.event.EventBus;
import com.softhis.rekrutacja.client.presenter.LoginFormPresenter;
import com.softhis.rekrutacja.client.presenter.MainPagePresenter;
import com.softhis.rekrutacja.client.presenter.MainPresenter;
import com.softhis.rekrutacja.client.presenter.UserFormPresenter;
import com.softhis.rekrutacja.client.presenter.UsersModulePresenter;
import com.softhis.rekrutacja.client.view.MainView;

/**
 * Main event bus
 * 
 * @author Sasak
 */

@Events(startView = MainView.class)
public interface MainEventBus extends EventBus {

	@Start
	@Event(handlers = MainPresenter.class)
	public void init();

	@Event(handlers = {MainPagePresenter.class, MainPresenter.class})
	public void setLogged();
	
	@Event(handlers = {MainPresenter.class, LoginFormPresenter.class })
	public void setLogin();
		
	@Event(handlers = MainPresenter.class)
	public void setContent(Widget content);
	
	@Event(handlers = MainPresenter.class)
	public void setMainHeader(String header);
	
	@Event(handlers = MainPagePresenter.class)
	public void openMainPage();
	
	@Event(handlers = UsersModulePresenter.class)
	public void openUsersModule();
	
	@Event(handlers = UserFormPresenter.class)
	public void openProfile();
	
	@Event(handlers = UserFormPresenter.class)
	public void openNewUser();
	
}